package de.reiberger.minesweeper.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

public class Mines extends JButton {

	/**
	 * 
	 */
	private static final long serialVersionUID = -296364487062665919L;

	private final class ActionListenerImplementation implements ActionListener {
		@Override
		public void actionPerformed(ActionEvent e) {
			System.out.println("Source: " + e.getSource());
			System.out.println("Status: " + status);
			System.out.println("X: " + x);
			System.err.println("Y: " + y);
		}
	}

	private int x;
	private int y;
	private boolean status;
	
	public Mines(int x, int y, boolean b) {
		this.x = x;
		this.y = y;
		this.status = b;
		this.setText(Integer.toString(x) + " " + Integer.toString(y));
		this.addActionListener(new ActionListenerImplementation());
	}
	
}
